package router

import (
	"alarm_service/common/logger"
	"github.com/gin-gonic/gin"
)

func (r *Router) registerApi(e *gin.Engine) {
	v1 := e.Group("/v1")
	{
		v1.GET("health", func(c *gin.Context) {
			logger.Infof("health")
			c.Set("data", "ok")
		})
		v1.POST("/alarm/phone", r.CommandApi.OnSetPhoneHandler)
		v1.POST("/alarm/message/switch", r.CommandApi.OnSetMessageSwitchHandler)
		v1.POST("/alarm/recover", r.CommandApi.OnSetRecoverHandler)
		//v1.POST("/alarm/phone/iccid", r.CommandApi.OnGetICCIDHandler)
		v1.POST("/alarm/phone/switch", r.CommandApi.OnSetPhoneSwitchHandler)
	}
}
